module Cool
  class EditableDropDown
    def initialize(input_name, select_name, options)
      @input_name = input_name
      @select_name = select_name
      @options = options
    end
    
    def render
      input_html = "<input type='text' name=#{@input_name}/>"
      select_html = "<div id='drop_down_div' class='hidden'><select name=#{@select_name}><option value=1>1</option></select></div>"
      button_html = "<input id='button_for_drop_down' type='button' value='V'"
      input_html + select_html + button_html
    end
  end
end

module ActionView
  module Helpers
    class FormBuilder
      def editable_drop_down(input_name, select_name, options)
        t = ::Cool::EditableDropDown.new(input_name, select_name, options)    
        t.render
      end
    end
  end
end